n,m=map(int,input().split())

class node:
    def __init__(self, x,y,t):
        self.x=x
        self.y=y
        self.t=t

ns=[]

for i in range(0,n):
    vals=input().split()
    x,y=map(int,vals[0:2])
    t=vals[2]
    ns.append(node(x,y,t))

for i in range(0,m):
    A=None
    B=None

    ps=list(map(int,input().split()))

    flag=True

    for item in ns:
        result=ps[0]+ps[1]*item.x+ps[2]*item.y
        if result==0:
            flag=False
            break
        if result>0:
            if item.t=="A":
                if A==None or A==1:
                    A=1
                else:
                    flag=False
                    break
            else:
                if B==None or B==1:
                    B=1
                else:
                    flag=False
                    break
        else:
            if item.t=="A":
                if A==None or A==-1:
                    A=-1
                else:
                    flag=False
                    break
            else:
                if B==None or B==-1:
                    B=-1
                else:
                    flag=False
                    break
    if flag:
        print("Yes")
    else:
        print("No")

